package com.ss6621.spring1.Mapper;

import com.ss6621.spring1.pojo.User;
import com.ss6621.spring1.utils.Result;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
    @Select("select * from user where username = #{username}")
    User findByUsername(@Param("username") String username);

    int insertUser(User user);

@Select("select * from user")
    List<User> findAll();

    int update( User user);
}
